package main

import (
	"fmt"
	"log"
	"net/http"
)

func main() {
	http.HandleFunc("/backend", ProcessRecv)
	if err := http.ListenAndServe("localhost:8080", nil); err != nil {
		log.Fatalln(err)
	}
}

func ProcessRecv(writer http.ResponseWriter, r *http.Request) {
	r.ParseForm()
	fmt.Println("awa")
	fmt.Println(r.PostForm)
	head := http.Header{}
	head.Add("Access-Control-Allow-Origin", "*")
	response := http.Response{}
	response.Status = "200"
	response.StatusCode = 200
	response.Header = head
	response.Write(writer)
}
